<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    function loadDrugInfo(visitId){
        $("#drugInfo").load('${ctx}/nurse/drugInfoSearch?visitId='+visitId);
    }
</script>
<div class="app">
        <div class="content-wrap">
            <ul class="nav nav-tabs">
                <li><a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/nurse/index')">床位列表</a></li>
                <li class="active">
                    <a href="#">处方查询</a>
                </li>
            </ul>
            <div class="row" id="topDivId">
                <div class="col-lg-3">
                    <section class="panel">
                        <div class="panel-body">
                            <table id="contentTable" class="table table-bordered mg-t datatable">
                                <thead>
                                  <tr>
                                      <th>床号</th>
                                      <th>姓名</th>
                                  </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${patVisits}" var="patVisit">
                                    <tr onclick="loadDrugInfo('${patVisit.id}');">
                                        <td>${patVisit.bedRec.bedNo}</td>
                                        <td>${patVisit.patVisitIndex.name}</td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </section>
                </div>
                <div class="col-lg-9" id="drugInfo">
                   <jsp:include page="drugSearchInfo.jsp"></jsp:include>
                </div>
            </div>
        </div>
</div>
</div>
</div>